<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Pooling Functions</title>
<title>CMSIS-NN: Pooling Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-NN
   &#160;<span id="projectnumber">Version 1.2.0</span>
   </div>
   <div id="projectbrief">CMSIS NN Software Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__Pooling.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Pooling Functions<div class="ingroups"><a class="el" href="group__groupNN.html">Neural Network Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Perform pooling functions, including max pooling and average pooling.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaeda2a7c2689d698398fb85278b7d940b"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Pooling.html#gaeda2a7c2689d698398fb85278b7d940b">arm_avgpool_s8</a> (const int dim_src_height, const int dim_src_width, const int dim_dst_height, const int dim_dst_width, const int stride_height, const int stride_width, const int dim_kernel_height, const int dim_kernel_width, const int padding_height, const int padding_width, const int act_min, const int act_max, const int ch_src, int8_t *src, int16_t *bufferA, int8_t *dst)</td></tr>
<tr class="memdesc:gaeda2a7c2689d698398fb85278b7d940b"><td class="mdescLeft">&#160;</td><td class="mdescRight">s8 average pooling function  <a href="group__Pooling.html#gaeda2a7c2689d698398fb85278b7d940b">More...</a><br /></td></tr>
<tr class="separator:gaeda2a7c2689d698398fb85278b7d940b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca9a9dfa088bec0c4ac16f14518cf6a3"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Pooling.html#gaca9a9dfa088bec0c4ac16f14518cf6a3">arm_avgpool_s8_get_buffer_size</a> (const int dim_dst_width, const int ch_src)</td></tr>
<tr class="memdesc:gaca9a9dfa088bec0c4ac16f14518cf6a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the required buffer size for S8 average pooling function.  <a href="group__Pooling.html#gaca9a9dfa088bec0c4ac16f14518cf6a3">More...</a><br /></td></tr>
<tr class="separator:gaca9a9dfa088bec0c4ac16f14518cf6a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ba8703e0f24059167f445c978026764"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Pooling.html#ga9ba8703e0f24059167f445c978026764">arm_max_pool_s8</a> (const uint16_t input_y, const uint16_t input_x, const uint16_t output_y, const uint16_t output_x, const uint16_t stride_y, const uint16_t stride_x, const uint16_t kernel_y, const uint16_t kernel_x, const uint16_t pad_y, const uint16_t pad_x, const int8_t act_min, const int8_t act_max, const uint16_t channel_in, int8_t *input, int16_t *tmp_buffer, int8_t *output)</td></tr>
<tr class="memdesc:ga9ba8703e0f24059167f445c978026764"><td class="mdescLeft">&#160;</td><td class="mdescRight">s8 pure C max pooling function  <a href="group__Pooling.html#ga9ba8703e0f24059167f445c978026764">More...</a><br /></td></tr>
<tr class="separator:ga9ba8703e0f24059167f445c978026764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga692bad3854c43c5b95c48de461ea9100"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Pooling.html#ga692bad3854c43c5b95c48de461ea9100">arm_max_pool_s8_opt</a> (const uint16_t input_y, const uint16_t input_x, const uint16_t output_y, const uint16_t output_x, const uint16_t stride_y, const uint16_t stride_x, const uint16_t kernel_y, const uint16_t kernel_x, const uint16_t pad_y, const uint16_t pad_x, const int8_t act_min, const int8_t act_max, const uint16_t depth, int8_t *src, int16_t *tmp_buffer, int8_t *dst)</td></tr>
<tr class="memdesc:ga692bad3854c43c5b95c48de461ea9100"><td class="mdescLeft">&#160;</td><td class="mdescRight">s8 DSP optimized max pooling function  <a href="group__Pooling.html#ga692bad3854c43c5b95c48de461ea9100">More...</a><br /></td></tr>
<tr class="separator:ga692bad3854c43c5b95c48de461ea9100"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99afcdcc61eaf429ab3ee823702e44ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Pooling.html#ga99afcdcc61eaf429ab3ee823702e44ce">arm_maxpool_q7_HWC</a> (q7_t *Im_in, const uint16_t dim_im_in, const uint16_t ch_im_in, const uint16_t dim_kernel, const uint16_t padding, const uint16_t stride, const uint16_t dim_im_out, q7_t *bufferA, q7_t *Im_out)</td></tr>
<tr class="memdesc:ga99afcdcc61eaf429ab3ee823702e44ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 max pooling function.  <a href="group__Pooling.html#ga99afcdcc61eaf429ab3ee823702e44ce">More...</a><br /></td></tr>
<tr class="separator:ga99afcdcc61eaf429ab3ee823702e44ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4a7b07f97ec4313524c9fb9fbcb1f6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Pooling.html#gae4a7b07f97ec4313524c9fb9fbcb1f6a">arm_avepool_q7_HWC</a> (q7_t *Im_in, const uint16_t dim_im_in, const uint16_t ch_im_in, const uint16_t dim_kernel, const uint16_t padding, const uint16_t stride, const uint16_t dim_im_out, q7_t *bufferA, q7_t *Im_out)</td></tr>
<tr class="memdesc:gae4a7b07f97ec4313524c9fb9fbcb1f6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 average pooling function.  <a href="group__Pooling.html#gae4a7b07f97ec4313524c9fb9fbcb1f6a">More...</a><br /></td></tr>
<tr class="separator:gae4a7b07f97ec4313524c9fb9fbcb1f6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae4a7b07f97ec4313524c9fb9fbcb1f6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae4a7b07f97ec4313524c9fb9fbcb1f6a">&#9670;&nbsp;</a></span>arm_avepool_q7_HWC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_avepool_q7_HWC </td>
          <td>(</td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>Im_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_im_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>ch_im_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_kernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>padding</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>stride</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_im_out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>bufferA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>Im_out</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">Im_in</td><td>pointer to input tensor </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_im_in</td><td>input tensor dimention </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ch_im_in</td><td>number of input tensor channels </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_kernel</td><td>filter kernel size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">padding</td><td>padding sizes </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride</td><td>convolution stride </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_im_out</td><td>output tensor dimension </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bufferA</td><td>pointer to buffer space for input </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">Im_out</td><td>pointer to output tensor</td></tr>
  </table>
  </dd>
</dl>
<p><b>Buffer size:</b></p>
<p>bufferA size: 2*dim_im_out*ch_im_in</p>
<p>The pooling function is implemented as split x-pooling then y-pooling.</p>
<p>This pooling function is input-destructive. Input data is undefined after calling this function. </p>

<p class="reference">References <a class="el" href="group__nndata__convert.html#gae349de4dba8d253c89d45794ccf05680">arm_q7_to_q15_no_shift()</a>.</p>

</div>
</div>
<a id="gaeda2a7c2689d698398fb85278b7d940b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeda2a7c2689d698398fb85278b7d940b">&#9670;&nbsp;</a></span>arm_avgpool_s8()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_avgpool_s8 </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_src_height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_src_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_dst_height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_dst_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>stride_height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>stride_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_kernel_height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_kernel_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>padding_height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>padding_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>act_min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>act_max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>ch_src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t *&#160;</td>
          <td class="paramname"><em>bufferA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_src_height</td><td>input tensor dimension </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_src_width</td><td>input tensor dimension </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_dst_height</td><td>output tensor dimension </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_dst_width</td><td>output tensor dimension </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride_height</td><td>stride along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride_width</td><td>stride along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_kernel_height</td><td>filter kernel size along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_kernel_width</td><td>filter kernel size along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">padding_height</td><td>padding size along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">padding_width</td><td>padding size along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">act_min</td><td>Min clamping </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">act_max</td><td>Max clamping </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ch_src</td><td>number of input tensor channels </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">src</td><td>pointer to input tensor </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferA</td><td>temporary buffer used for optimization and is necessary when ARM_MATH_DSP is defined. Required space: (ch_src * dim_dst_width) * sizeof(q15_t) bytes Use <a class="el" href="group__Pooling.html#gaca9a9dfa088bec0c4ac16f14518cf6a3" title="Get the required buffer size for S8 average pooling function.">arm_avgpool_s8_get_buffer_size()</a> to get the size </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">dst</td><td>pointer to output tensor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns one of the following <code>ARM_MATH_SIZE_MISMATCH</code> - Unsupported dimension of tensors <code>ARM_MATH_SUCCESS</code> - Successful operation <code>ARM_MATH_ARGUMENT_ERROR</code> - Implementation not available</dd></dl>
<ul>
<li>Supported Framework: TensorFlow Lite </li>
</ul>

<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#ad935f1ff1a50822e317bdb321ce991ad">MAX</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#adcd021ac91d43a62b2cdecf9a5b971a7">MIN</a>.</p>

</div>
</div>
<a id="gaca9a9dfa088bec0c4ac16f14518cf6a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaca9a9dfa088bec0c4ac16f14518cf6a3">&#9670;&nbsp;</a></span>arm_avgpool_s8_get_buffer_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t arm_avgpool_s8_get_buffer_size </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>dim_dst_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>ch_src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_dst_width</td><td>output tensor dimension </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ch_src</td><td>number of input tensor channels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns required buffer size </dd></dl>

</div>
</div>
<a id="ga9ba8703e0f24059167f445c978026764"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9ba8703e0f24059167f445c978026764">&#9670;&nbsp;</a></span>arm_max_pool_s8()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_max_pool_s8 </td>
          <td>(</td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>input_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>input_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>output_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>output_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>kernel_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>kernel_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>pad_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>pad_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t&#160;</td>
          <td class="paramname"><em>act_min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t&#160;</td>
          <td class="paramname"><em>act_max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>channel_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t *&#160;</td>
          <td class="paramname"><em>tmp_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_y</td><td>input tensor dimension along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_x</td><td>input tensor dimension along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_y</td><td>output tensor dimension along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_x</td><td>output tensor dimension along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride_y</td><td>stride along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride_x</td><td>stride along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">kernel_y</td><td>filter kernel size along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">kernel_x</td><td>filter kernel size along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pad_y</td><td>padding size along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pad_x</td><td>padding size along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">act_min</td><td>Activation min. Lower limit to clamp output to. Range: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">act_max</td><td>Activation max. Upper limit to clamp output to. Range: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel_in</td><td>number of input channels </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>pointer to input tensor </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tmp_buffer</td><td>Not used. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">output</td><td>pointer to output tensor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns one of the following <code>ARM_MATH_SIZE_MISMATCH</code> - Unsupported dimension of tensors <code>ARM_MATH_SUCCESS</code> - Successful operation <code>ARM_MATH_ARGUMENT_ERROR</code> - Implementation not available</dd></dl>
<ul>
<li>This basic implementation is recommended when number of channels is less than 4 and/or dimensions are small. </li>
</ul>

<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#ad935f1ff1a50822e317bdb321ce991ad">MAX</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#adcd021ac91d43a62b2cdecf9a5b971a7">MIN</a>.</p>

<p class="reference">Referenced by <a class="el" href="group__Pooling.html#ga692bad3854c43c5b95c48de461ea9100">arm_max_pool_s8_opt()</a>.</p>

</div>
</div>
<a id="ga692bad3854c43c5b95c48de461ea9100"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga692bad3854c43c5b95c48de461ea9100">&#9670;&nbsp;</a></span>arm_max_pool_s8_opt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_max_pool_s8_opt </td>
          <td>(</td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>input_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>input_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>output_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>output_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>kernel_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>kernel_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>pad_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>pad_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t&#160;</td>
          <td class="paramname"><em>act_min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t&#160;</td>
          <td class="paramname"><em>act_max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>depth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t *&#160;</td>
          <td class="paramname"><em>tmp_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_y</td><td>input tensor dimension along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_x</td><td>input tensor dimension along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_y</td><td>output tensor dimension along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_x</td><td>output tensor dimension along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride_y</td><td>stride along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride_x</td><td>stride along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">kernel_y</td><td>filter kernel size along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">kernel_x</td><td>filter kernel size along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pad_y</td><td>padding size along y </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pad_x</td><td>padding size along x </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">act_min</td><td>Activation min. Lower limit to clamp output to. Range: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">act_max</td><td>Activation max. Upper limit to clamp output to. Range: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">depth</td><td>number of input channels </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>pointer to input tensor </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tmp_buffer</td><td>Not used. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">output</td><td>pointer to output tensor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns one of the following <code>ARM_MATH_SIZE_MISMATCH</code> - Unsupported dimension of tensors <code>ARM_MATH_SUCCESS</code> - Successful operation <code>ARM_MATH_ARGUMENT_ERROR</code> - Implementation not available </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The input data is corrupted by this function.</dd></dl>
<p>This optimized implementation is recommended when depth is &gt;= 4 and dimensions are large. </p>

<p class="reference">References <a class="el" href="group__Pooling.html#ga9ba8703e0f24059167f445c978026764">arm_max_pool_s8()</a>.</p>

</div>
</div>
<a id="ga99afcdcc61eaf429ab3ee823702e44ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga99afcdcc61eaf429ab3ee823702e44ce">&#9670;&nbsp;</a></span>arm_maxpool_q7_HWC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_maxpool_q7_HWC </td>
          <td>(</td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>Im_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_im_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>ch_im_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_kernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>padding</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>stride</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_im_out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>bufferA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>Im_out</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">Im_in</td><td>pointer to input tensor </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_im_in</td><td>input tensor dimention </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ch_im_in</td><td>number of input tensor channels </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_kernel</td><td>filter kernel size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">padding</td><td>padding sizes </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stride</td><td>convolution stride </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_im_out</td><td>output tensor dimension </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bufferA</td><td>Not used </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">Im_out</td><td>pointer to output tensor</td></tr>
  </table>
  </dd>
</dl>
<p>The pooling function is implemented as split x-pooling then y-pooling.</p>
<p>This pooling function is input-destructive. Input data is undefined after calling this function. </p>

<p class="reference">Referenced by <a class="el" href="arm__nnexamples__cifar10_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Mar 17 2020 15:01:26 for CMSIS-NN Version 1.2.0 by Arm Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 
	-->
	</li>
  </ul>
</div>
</body>
</html>
